<template>
	<view class="content">
		<button class="btn" @click="testBtn">测试链接成功</button>
		
		<button class="btn" @click="rangersInit">初始化插件</button>
	</view>
</template>

<script>
	
	var testModel = uni.requireNativePlugin("RangersManager-RanagersTestModel")
	var appMg = uni.requireNativePlugin("RangersManager-RangersAppManager")
	
	export default {
		data() {
			return {
				title: 'Hello'
			}
		},
		onLoad() {

		},
		methods: {
				
			testBtn(){
				testModel.rangersTestAsyncFunc({"data":"123456"},(res)=>{
					
					uni.showToast({
						title:"测试"+res,
						icon:"none"
					})
					
				})
			},
				
			rangersInit(){
				
				appMg.rangersInitAsyncFunc({"appName":"gpkj_cs_ios","appID":"300289","channel":"AppStore"},(res)=>{
					uni.showToast({
						title:"初始化成功"+JSON.stringify(res),
						icon:"none"
					})
				})
			}
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}
	
.btn{
	width: 300rpx;
	height: 80rpx;
	background-color: #007AFF;
	color: #F8F8F8;
	line-height: 80rpx;
	margin-top: 20rpx;
}

</style>
